uniform sampler2D heightmap;
uniform float bumpScale;
 
varying vec2 vUv;


void main() {

    #include <skinbase_vertex>
    #include <skinnormal_vertex>
    vUv = uv;
    vec4 bumpdata = texture2D(heightmap, uv);

    float vAmount = bumpdata.r;

    vec3 newpos = position - normal * bumpScale * vAmount;
    gl_Position = projectionMatrix * modelViewMatrix * vec4(newpos, 1.0);
    
    #include <logdepthbuf_vertex>
}
